﻿namespace Bricks.Caching
{

    /// <summary>
    /// 
    /// </summary>
    public interface ICacheFacade
    {

        /// <summary>
        /// 
        /// </summary>
        /// <param name="key"></param>
        /// <returns></returns>
        object this[string key] { get; }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="key"></param>
        /// <param name="value"></param>
        void Add(string key, object value);

        /// <summary>
        /// 
        /// </summary>
        /// <param name="key"></param>
        /// <returns></returns>
        bool Contains(string key);

        /// <summary>
        /// 
        /// </summary>
        /// <param name="key"></param>
        /// <returns></returns>
        object Get(string key);

        /// <summary>
        /// 
        /// </summary>
        /// <typeparam name="TValue"></typeparam>
        /// <param name="key"></param>
        /// <returns></returns>
        TValue Get<TValue>(string key);

        /// <summary>
        /// 
        /// </summary>
        /// <param name="key"></param>
        void Remove(string key);

        /// <summary>
        /// 
        /// </summary>
        void Flush();
    }

    /// <summary>
    /// 
    /// </summary>
    /// <typeparam name="TCache"></typeparam>
    public interface ICacheFacade<TCache> : ICacheFacade, IFacade<TCache>
    {
    }
}
